class Blog < ActiveRecord::Base
  has_many :posts, :dependent=>:destroy
  belongs_to :user
  has_attached_file :blog_photo
  validates_attachment_size :blog_photo, :less_than => 1.megabytes
  validates_attachment_content_type :blog_photo, :content_type => ['image/jpeg', 'image/png', 'image/gif']
end
